<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link href="<c:url value='/css/Team2CSS.css'/>" rel="stylesheet" type="text/css"/>
<fmt:setBundle basename="Messages_en" />
<title>Booking In Process</title>
</head>
<body>
<%@ include file="header.jsp" %>
<table>
<tr>
<td width=15%></td>
<td class="menuborder" width=20%>
<c:if test="${sessionScope.roleUser=='Admin'}">
<table id="head">
			<tr>
<!-- 				<td><h2 id="header">ISS Facilities Booking</h2></td> -->
				<td>
<!-- 				<input type="hidden" name="welcome" id="show_greeting" /> -->
				<c:if test="${!empty sessionScope.LoggedinUser.username}">
				<h5>Welcome ${sessionScope.LoggedinUser.username}</h5>
				</c:if>
				</td>
			</tr>
		</table>
		<table id="content">
			<tr>
				<td><h2 id="header">MENU</h2></td>
			</tr>
			<tr>
				<td><a href="MakeABooking.jsp">Make a Booking</a></td>
			</tr>
			<tr>
				<td><a href="BookDetailsController">View Booking Details</a></td>
			</tr>
			<tr>
				<td><a href="BookingHistoryController">View Booking History</a></td>
			</tr>
			<tr>
				<td><a href="ManageStaff.jsp">Manage Staff</a></td>
			</tr>
			<tr>
				<td><a href="LoadFacility">Manage Facilities</a></td>
			</tr>
			<tr>
				<td><a href="Login.jsp">Sign Out</a>
				</td>
			</tr>
		</table>
</c:if>
<c:if test="${sessionScope.roleUser=='Manager'}">
<table id="head">
			<tr>
			<td>
				<c:if test="${!empty sessionScope.LoggedinUser.username}">
					<h5>Welcome ${sessionScope.LoggedinUser.username}</h5>
				</c:if>
			</td>
			</tr>
		</table>
		<table id="content">
			<tr>
				<td><h2 id="header">MENU</h2></td>
			</tr>
			<tr>
				<td><a href="MakeABooking.jsp">Make a Booking</a></td>
			</tr>
			<tr>
				<td><a href="BookDetailsController">View Booking Details</a></td>
			</tr>
			<tr>
				<td><a href="BookingHistoryController">View Booking History</a></td>
			</tr>
			<tr>
				<td><a href="ReviewController">Review Booking</a></td>
			</tr>
			<tr>
				<td><a href="Login.jsp">Sign Out</a></td>
			</tr>
		</table>
</c:if>
<c:if test="${sessionScope.roleUser=='Staff'}">
		<table id="head">
			<tr>
<!-- 				<td><h2 id="header">ISS Facilities Booking</h2></td> -->
				<c:if test="${!empty sessionScope.LoggedinUser.username}">
					<h5>Welcome ${sessionScope.LoggedinUser.username}</h5>
				</c:if>
			</tr>
			<tr></tr>
		</table>
		<table id="content">
			<tr></tr>
			<tr></tr>
			<tr>
				<td><h2 id="header">MENU</h2></td>
			</tr>
			<tr>
				<td><a href="MakeABooking.jsp">Make a Booking</a></td>
			</tr>
			<tr>
				<td><a href="BookDetailsController">View Booking Details</a></td>
			</tr>
			<tr>
				<td><a href="BookingHistoryController">View Booking History</a></td>
			</tr>
			<tr>
				<td><a href="Login.jsp">Sign out</a></td>
			</tr>
		</table>
</c:if>
</td>
<td width=55%>
		<h1><fmt:message key="label.Booking.inProcess"/></h1>
        <br/><br/>
        <table class="frame">
        
            <tr>
               <th>Sr.No.</th>
                <th><fmt:message key="label.Booking.bookId"/></th>
                <th><fmt:message key="label.Booking.roomName"/></th>
                <th><fmt:message key="label.Booking.fromDate"/></th>
                <th><fmt:message key="label.Booking.toDate"/></th>
                <th><fmt:message key="label.edit"/></th> 
                <th><fmt:message key="label.delete"/></th>
            </tr>
            <c:forEach var="bookings" items="${booking}" varStatus="status">
                <tr class="${status.index%2==0?'even':'odd'}">
                    <td class="frame">${status.index + 1}</td>
                    <td class="frame">${bookings.getBookingID()}</td>
                    <td class="frame">${bookings.getFacilityName()}</td>
                    <td class="frame">${bookings.getFromDate()}</td>
                    <td class="frame">${bookings.getToDate()}</td>
                    <td class="frame">
                        <c:url var="updurl" scope="page" value="/UpdateBooking.jsp">
        		        <c:param name="bbid" value="${bookings.bookingID}"/>
                        <c:param name="update" value="true"/>
                        </c:url>
                        <a href="${updurl}"><fmt:message key="label.yes"/></a></td>
                        <td class="frame">
                        <c:url var="url" scope="page" value="/DeleteController">
                        <c:param name="BookingID" value="${bookings.bookingID}"/>
                        </c:url>
                        <a href="${url}"><fmt:message key="label.yes"/></a>
                    </td>
                </tr>
            </c:forEach>
        </table>
        </td>
<td width=10%></td>
</tr>
</table>
<%@ include file="footer.jsp" %>
</body>
</html>